home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_teo_statdown.cog < prev    next >
Text File  |  1999-11-15  |  2KB  |  83 lines

  1. #    Jones 3D Cog Script
  2. #    
  3. #     TEO_StatDown.cog
  4. #
  5. #    Sends the statue back down
  6. #
  7. #     [SXC]
  8. #
  9. #     (C) 1997 LucasArts Entertainment Co. All Rights Reserved
  10. # ========================================================================================
  11.  
  12. symbols
  13.  
  14.     message        startup
  15.     message        activated
  16.  
  17.     thing        statue
  18.     thing        biggear
  19.     thing        column0
  20.     thing        column1
  21.     thing        column2
  22.     
  23.     surface        downswitch
  24.  
  25.     thing        door0                    linkid=2
  26.     thing        door1                    linkid=2
  27.     thing        door2                    linkid=2
  28.     thing        door3                    linkid=2
  29.     thing        door4                    linkid=2
  30.     thing        door5                    linkid=2
  31.  
  32.     float        moveSpeed=1.0        
  33.     int            locked                    local
  34.     int            check                    local
  35.     int            doorcount                local
  36.  
  37. end
  38.  
  39. # ........................................................................................
  40. code
  41.  
  42. startup:
  43.  
  44.     locked = 0;                                            //switch is unlocked
  45.     check = 0;
  46.     return;
  47.  
  48. # ........................................................................................
  49.  
  50. activated:
  51.  
  52.     if ((GetSenderRef() == downswitch) &&
  53.          (locked = 0))
  54.     {
  55.         for (doorcount=0; doorcount<=5; doorcount=doorcount+1)
  56.         {
  57.             if (GetCurFrame(door0[doorcount]) == 1)
  58.             {
  59.                 check = check + 1;
  60.                 //print("check is");
  61.                 //printint(check);
  62.             }            
  63.         }
  64.  
  65.         if (check == 6)
  66.         {
  67.             locked = 1;                                 //lock switch
  68.             MoveToFrame(statue, 0, moveSpeed);
  69.             MoveToFrame(biggear, 0, moveSpeed);
  70.         }
  71.         else if (check < 6)
  72.         {
  73.             locked = 0;
  74.             check=0;
  75.             //print("Incomplete Sequence");
  76.         }
  77.     }
  78.     return;
  79.  
  80.     end
  81.  
  82.  
  83.